<div class="row-fluid">
    <div class="navbar no-margin">
        <div class="navbar-inner">
            <ul class="breadcrumb">
                <i class="icon-chevron-left hide-sidebar"><a href='#' title="Hide Sidebar" rel='tooltip'>&nbsp;</a></i>
                <i class="icon-chevron-right show-sidebar" style="display:none;"><a href='#' title="Show Sidebar"
                        rel='tooltip'>&nbsp;</a></i>
                <li>
                    <a href="#/onduty">首页</a>
                </li>
                <li>
                    <a href="#/star/user/role">授权管理</a>
                </li>
                <li class="active">权限配置</li>
            </ul>
        </div>
    </div>
</div>

<div class="container-fluid">

    <div class="row">
        <div class="col-sm-12 col-md-12 main">
            <div class="col-md-6 col-md-offset-3">
                <form name="form" novalidate>
                    <div class="form-group" ng-class="{'has-error':form.functionLabels.$error.required,'has-success':!form.functionLabels.$error.required}">
                        <label style="padding: 0 0 5px">权限标签</label>
                        <input id="functionLabels" type="text" class="form-control" name="functionLabels"
                               ng-model="vm.p.functionLabels" data-role="tagsinput" required/>
                        <span ng-show="form.functionLabels.$error.required" class="help-block">请输入权限标签</span>
                    </div>

                    <div class="form-group"
                        ng-class="{'has-error':form.roleName.$error.required,'has-success':!form.roleName.$error.required}">
                        <label style="padding: 0 0 5px">授权类型（用户,用户组）</label>
                        <input type="text" class="form-control" name="roleName" ng-model="vm.p.roleName" required />

                        <span ng-show="form.roleName.$error.required" class="help-block">请填写授权类型</span>
                    </div>

                    <div class="form-group" ng-show="vm.p.roleName=='用户'">
                        <label style="padding: 0 0 5px">用户名</label>
                        <input id="userIds" type="text" class="form-control" data-role="tagsinput" name="userIds"
                            ng-model="vm.p.userIds"/>
                    </div>

                    <div class="form-group" ng-show="vm.p.roleName!='用户'">
                        <label style="padding: 0 0 5px">用户组</label>
                        <input id="userGroupIds" type="text" class="form-control" data-role="tagsinput" name="userGroupIds"
                               ng-model="vm.p.userGroupIds" />
                    </div>



                    <div class="form-group">
                        <input class="btn btn-primary" ng-class="{'disabled':!form.$valid}" type="button" value="确定"
                            ng-click="form.$valid&&roleSave()" />
                        <a href="#/star/user/role" class="btn btn-default">返回</a>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>
<!--/.container-->